<?php

/**
 * Source code under Creative Commons License 
 * (see LICENSE FILE)
 *
 * Copyright (c) 2013 Maelstrom.
 * All rights reserved.
 *
 *
 * @author      Maelstrom <devcreamframework@gmail.com>
 * @copyright   2012 Maelstrom.
 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 * @link        https://github.com/maelstromkd/cream-dev.git
 * @version     1.2
 */

require realpath(dirname(__FILE__)) . '/../../core/paths.php';
require realpath(dirname(__FILE__)) . '/../../core/solidMysql.php';

if(isset($_GET['a'])){
	switch ($_GET['a']) {
		case 'play':
			file_put_contents(__NCONTROL__, 1);
			break;

		case 'stop':
			file_put_contents(__NCONTROL__, 0);
			break;

		case 'init':
			file_put_contents(__NCONTROL__, 0);
			mysql_query('update mailinglist set status=0');
			break;
	}
}

mysql_close();